.class Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;
.super Lcom/noshufou/android/su/widget/BetterPopupWindow;
.source "AppDetailsFragment.java"

# interfaces
.implements Landroid/widget/CompoundButton$OnCheckedChangeListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/noshufou/android/su/AppDetailsFragment;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "MoreOptionsPopup"
.end annotation


# instance fields
.field private mLoggingCheckBox:Landroid/widget/CheckBox;

.field private mNotificationsCheckBox:Landroid/widget/CheckBox;

.field private mUseAppCheckBox:Landroid/widget/CheckBox;

.field final synthetic this$0:Lcom/noshufou/android/su/AppDetailsFragment;


# direct methods
.method public constructor <init>(Lcom/noshufou/android/su/AppDetailsFragment;Landroid/view/View;)V
    .locals 0
    .parameter
    .parameter "anchor"

    .prologue
    .line 387
    iput-object p1, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    .line 388
    invoke-direct {p0, p2}, Lcom/noshufou/android/su/widget/BetterPopupWindow;-><init>(Landroid/view/View;)V

    .line 389
    return-void
.end method


# virtual methods
.method public onCheckedChanged(Landroid/widget/CompoundButton;Z)V
    .locals 9
    .parameter "buttonView"
    .parameter "isChecked"

    .prologue
    const/4 v4, 0x0

    const/4 v5, 0x1

    const/4 v6, 0x0

    .line 419
    iget-object v3, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    invoke-virtual {v3}, Lcom/noshufou/android/su/AppDetailsFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v3

    invoke-virtual {v3}, Landroid/support/v4/app/FragmentActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    .line 420
    .local v0, cr:Landroid/content/ContentResolver;
    invoke-virtual {p1}, Landroid/widget/CompoundButton;->getId()I

    move-result v3

    const v7, 0x7f0a0038

    if-ne v3, v7, :cond_5

    .line 421
    iget-object v3, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #setter for: Lcom/noshufou/android/su/AppDetailsFragment;->mUseAppSettings:Z
    invoke-static {v3, p2}, Lcom/noshufou/android/su/AppDetailsFragment;->access$4(Lcom/noshufou/android/su/AppDetailsFragment;Z)V

    .line 422
    iget-object v7, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mNotificationsCheckBox:Landroid/widget/CheckBox;

    iget-object v3, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mUseAppSettings:Z
    invoke-static {v3}, Lcom/noshufou/android/su/AppDetailsFragment;->access$1(Lcom/noshufou/android/su/AppDetailsFragment;)Z

    move-result v3

    if-eqz v3, :cond_1

    move v3, v4

    :goto_0
    invoke-virtual {v7, v3}, Landroid/widget/CheckBox;->setEnabled(Z)V

    .line 423
    iget-object v3, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mLoggingCheckBox:Landroid/widget/CheckBox;

    iget-object v7, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mUseAppSettings:Z
    invoke-static {v7}, Lcom/noshufou/android/su/AppDetailsFragment;->access$1(Lcom/noshufou/android/su/AppDetailsFragment;)Z

    move-result v7

    if-eqz v7, :cond_2

    :goto_1
    invoke-virtual {v3, v4}, Landroid/widget/CheckBox;->setEnabled(Z)V

    .line 424
    new-instance v2, Landroid/content/ContentValues;

    invoke-direct {v2}, Landroid/content/ContentValues;-><init>()V

    .line 425
    .local v2, values:Landroid/content/ContentValues;
    const-string v4, "notifications"

    if-eqz p2, :cond_3

    move-object v3, v6

    :goto_2
    invoke-virtual {v2, v4, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Boolean;)V

    .line 426
    const-string v4, "logging"

    if-eqz p2, :cond_4

    move-object v3, v6

    :goto_3
    invoke-virtual {v2, v4, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Boolean;)V

    .line 427
    sget-object v3, Lcom/noshufou/android/su/provider/PermissionsProvider$Apps;->CONTENT_URI:Landroid/net/Uri;

    iget-object v4, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mShownIndex:J
    invoke-static {v4}, Lcom/noshufou/android/su/AppDetailsFragment;->access$5(Lcom/noshufou/android/su/AppDetailsFragment;)J

    move-result-wide v7

    invoke-static {v3, v7, v8}, Landroid/content/ContentUris;->withAppendedId(Landroid/net/Uri;J)Landroid/net/Uri;

    move-result-object v3

    invoke-virtual {v0, v3, v2, v6, v6}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    .line 429
    if-eqz p2, :cond_0

    .line 430
    iget-object v3, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    invoke-virtual {v3}, Lcom/noshufou/android/su/AppDetailsFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v3

    invoke-static {v3}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v1

    .line 431
    .local v1, prefs:Landroid/content/SharedPreferences;
    iget-object v3, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    const-string v4, "pref_notifications"

    invoke-interface {v1, v4, v5}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v4

    #setter for: Lcom/noshufou/android/su/AppDetailsFragment;->mNotificationsEnabled:Z
    invoke-static {v3, v4}, Lcom/noshufou/android/su/AppDetailsFragment;->access$6(Lcom/noshufou/android/su/AppDetailsFragment;Z)V

    .line 432
    iget-object v3, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mNotificationsCheckBox:Landroid/widget/CheckBox;

    iget-object v4, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mNotificationsEnabled:Z
    invoke-static {v4}, Lcom/noshufou/android/su/AppDetailsFragment;->access$2(Lcom/noshufou/android/su/AppDetailsFragment;)Z

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 433
    iget-object v3, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    const-string v4, "pref_logging"

    invoke-interface {v1, v4, v5}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v4

    #setter for: Lcom/noshufou/android/su/AppDetailsFragment;->mLoggingEnabled:Z
    invoke-static {v3, v4}, Lcom/noshufou/android/su/AppDetailsFragment;->access$7(Lcom/noshufou/android/su/AppDetailsFragment;Z)V

    .line 434
    iget-object v3, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mLoggingCheckBox:Landroid/widget/CheckBox;

    iget-object v4, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mLoggingEnabled:Z
    invoke-static {v4}, Lcom/noshufou/android/su/AppDetailsFragment;->access$3(Lcom/noshufou/android/su/AppDetailsFragment;)Z

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 443
    .end local v1           #prefs:Landroid/content/SharedPreferences;
    :cond_0
    :goto_4
    return-void

    .end local v2           #values:Landroid/content/ContentValues;
    :cond_1
    move v3, v5

    .line 422
    goto :goto_0

    :cond_2
    move v4, v5

    .line 423
    goto :goto_1

    .line 425
    .restart local v2       #values:Landroid/content/ContentValues;
    :cond_3
    iget-object v3, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mNotificationsEnabled:Z
    invoke-static {v3}, Lcom/noshufou/android/su/AppDetailsFragment;->access$2(Lcom/noshufou/android/su/AppDetailsFragment;)Z

    move-result v3

    invoke-static {v3}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v3

    goto :goto_2

    .line 426
    :cond_4
    iget-object v3, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mLoggingEnabled:Z
    invoke-static {v3}, Lcom/noshufou/android/su/AppDetailsFragment;->access$3(Lcom/noshufou/android/su/AppDetailsFragment;)Z

    move-result v3

    invoke-static {v3}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v3

    goto :goto_3

    .line 437
    .end local v2           #values:Landroid/content/ContentValues;
    :cond_5
    new-instance v2, Landroid/content/ContentValues;

    invoke-direct {v2}, Landroid/content/ContentValues;-><init>()V

    .line 438
    .restart local v2       #values:Landroid/content/ContentValues;
    const-string v3, "notifications"

    iget-object v4, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mNotificationsCheckBox:Landroid/widget/CheckBox;

    invoke-virtual {v4}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v4

    invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Boolean;)V

    .line 439
    const-string v3, "logging"

    iget-object v4, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mLoggingCheckBox:Landroid/widget/CheckBox;

    invoke-virtual {v4}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v4

    invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Boolean;)V

    .line 440
    sget-object v3, Lcom/noshufou/android/su/provider/PermissionsProvider$Apps;->CONTENT_URI:Landroid/net/Uri;

    iget-object v4, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mShownIndex:J
    invoke-static {v4}, Lcom/noshufou/android/su/AppDetailsFragment;->access$5(Lcom/noshufou/android/su/AppDetailsFragment;)J

    move-result-wide v4

    invoke-static {v3, v4, v5}, Landroid/content/ContentUris;->withAppendedId(Landroid/net/Uri;J)Landroid/net/Uri;

    move-result-object v3

    invoke-virtual {v0, v3, v2, v6, v6}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    goto :goto_4
.end method

.method protected onCreate()V
    .locals 6

    .prologue
    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 394
    iget-object v2, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->anchor:Landroid/view/View;

    invoke-virtual {v2}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v2

    .line 395
    const-string v5, "layout_inflater"

    invoke-virtual {v2, v5}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    .line 394
    check-cast v0, Landroid/view/LayoutInflater;

    .line 397
    .local v0, inflater:Landroid/view/LayoutInflater;
    const v2, 0x7f030010

    const/4 v5, 0x0

    invoke-virtual {v0, v2, v5}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/view/ViewGroup;

    .line 399
    .local v1, root:Landroid/view/ViewGroup;
    const v2, 0x7f0a0038

    invoke-virtual {v1, v2}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/CheckBox;

    iput-object v2, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mUseAppCheckBox:Landroid/widget/CheckBox;

    .line 400
    iget-object v2, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mUseAppCheckBox:Landroid/widget/CheckBox;

    iget-object v5, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mUseAppSettings:Z
    invoke-static {v5}, Lcom/noshufou/android/su/AppDetailsFragment;->access$1(Lcom/noshufou/android/su/AppDetailsFragment;)Z

    move-result v5

    invoke-virtual {v2, v5}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 402
    const v2, 0x7f0a0039

    invoke-virtual {v1, v2}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/CheckBox;

    iput-object v2, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mNotificationsCheckBox:Landroid/widget/CheckBox;

    .line 403
    iget-object v2, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mNotificationsCheckBox:Landroid/widget/CheckBox;

    iget-object v5, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mNotificationsEnabled:Z
    invoke-static {v5}, Lcom/noshufou/android/su/AppDetailsFragment;->access$2(Lcom/noshufou/android/su/AppDetailsFragment;)Z

    move-result v5

    invoke-virtual {v2, v5}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 404
    iget-object v5, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mNotificationsCheckBox:Landroid/widget/CheckBox;

    iget-object v2, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mUseAppSettings:Z
    invoke-static {v2}, Lcom/noshufou/android/su/AppDetailsFragment;->access$1(Lcom/noshufou/android/su/AppDetailsFragment;)Z

    move-result v2

    if-eqz v2, :cond_0

    move v2, v3

    :goto_0
    invoke-virtual {v5, v2}, Landroid/widget/CheckBox;->setEnabled(Z)V

    .line 406
    const v2, 0x7f0a003a

    invoke-virtual {v1, v2}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/CheckBox;

    iput-object v2, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mLoggingCheckBox:Landroid/widget/CheckBox;

    .line 407
    iget-object v2, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mLoggingCheckBox:Landroid/widget/CheckBox;

    iget-object v5, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mLoggingEnabled:Z
    invoke-static {v5}, Lcom/noshufou/android/su/AppDetailsFragment;->access$3(Lcom/noshufou/android/su/AppDetailsFragment;)Z

    move-result v5

    invoke-virtual {v2, v5}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 408
    iget-object v2, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mLoggingCheckBox:Landroid/widget/CheckBox;

    iget-object v5, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->this$0:Lcom/noshufou/android/su/AppDetailsFragment;

    #getter for: Lcom/noshufou/android/su/AppDetailsFragment;->mUseAppSettings:Z
    invoke-static {v5}, Lcom/noshufou/android/su/AppDetailsFragment;->access$1(Lcom/noshufou/android/su/AppDetailsFragment;)Z

    move-result v5

    if-eqz v5, :cond_1

    :goto_1
    invoke-virtual {v2, v3}, Landroid/widget/CheckBox;->setEnabled(Z)V

    .line 410
    iget-object v2, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mUseAppCheckBox:Landroid/widget/CheckBox;

    invoke-virtual {v2, p0}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    .line 411
    iget-object v2, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mNotificationsCheckBox:Landroid/widget/CheckBox;

    invoke-virtual {v2, p0}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    .line 412
    iget-object v2, p0, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->mLoggingCheckBox:Landroid/widget/CheckBox;

    invoke-virtual {v2, p0}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    .line 414
    invoke-virtual {p0, v1}, Lcom/noshufou/android/su/AppDetailsFragment$MoreOptionsPopup;->setContentView(Landroid/view/View;)V

    .line 415
    return-void

    :cond_0
    move v2, v4

    .line 404
    goto :goto_0

    :cond_1
    move v3, v4

    .line 408
    goto :goto_1
.end method
